<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: E73AN
  Date: 2018/5/30
  Time: 12:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>学生选课信息</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <h1>学生选课(成绩)信息</h1>
    <table class="table table-hover">
        <thead>
        <tr>
            <th scope="col">#</th>
            <th scope="col">课程代号</th>
            <th scope="col">课程名称</th>
            <th scope="col">课程分数</th>
        </tr>
        </thead>
        <tbody>
        <c:choose>
            <c:when test="${scores != null}">
                <c:forEach items="${scores}" var="score" varStatus="status">
                    <tr>
                        <td>${status.index+1}</td>
                        <td>${score.course.courseCode}</td>
                        <td>${score.course.name}</td>
                        <td>${score.score}</td>
                    </tr>
                </c:forEach>
            </c:when>
        </c:choose>
        </tbody>
    </table>
    <c:if test="${scores == null}">
        <div class="alert alert-primary" role="alert">
            该学生暂无选课信息
        </div>
    </c:if>
</div>
</body>
</html>
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/static/js/bootstrap.min.js"></script>
